<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center">ID</th>
            <th width="25%" class="text-center">手机/邮箱/账号</th>
            <th class="text-center" width="12%">昵称</th>
            <th class="text-center" width="8%">注册方式</th>
            <th class="text-center" width="10%">注册时间</th>
            <th class="text-center" width="15%">第三方绑定账号</th>
            <th class="text-center" width="5%">是否购课</th>
            <th class="text-center" width="5%">状态</th>
            <th class="text-center" width="15%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody>
            <tr class="jqgfirstrow" role="row">
                <td role="gridcell"><div class="table-first-id">&nbsp;</div></td>
                <th width="25%" class="text-center"></th>
                <th role="gridcell" width="12%"></th>
                <th role="gridcell" width="8%"></th>
                <th role="gridcell" width="10%"></th>
                <th role="gridcell" width="15%"></th>
                <th role="gridcell" width="5%"></th>
                <th role="gridcell" width="5%"></th>
                <th role="gridcell" width="15%"></th>
            </tr>
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="user : ${dataMap['list']}" th:attr="data-id=${user['id']}" th:attrappend="data-status=${user['status']}" th:attrprepend="id='user-'+${user['id']}">
                    <td class="text-center">
                        <div class="table-first-id">
                            <input type="checkbox"  name="userId" th:value="${user['id']}" class="i-checks"/>
                           <!-- <span th:text="${user['id']}"></span>-->
                        </div>
                    </td>
                    <td class="text-center">
                        <span th:if="${user['mobile']}==null or ${user['mobile']}==''">—/</span>
                        <span th:if="${user['mobile']}!=null and ${user['mobile']}!=''" th:text="${user['mobile']}+'/'"></span>
                        <span th:if="${user['email']}==null or ${user['email']}==''">—/</span>
                        <span th:if="${user['email']}!=null and ${user['email']}!=''" th:text="${user['email']}+'/'"></span>
                        <span th:if="${user['loginAccount']}==null or ${user['loginAccount']}==''">—</span>
                        <span th:if="${user['loginAccount']}!=null" th:text="${user['loginAccount']}"></span>
                    </td>
                    <td>
                        <span th:if="${user['nickname']}==null or ${user['nickname']}==''">—</span>
                        <span th:if="${user['nickname']}!=null">
                            <img th:src="${#strings.isEmpty(user['avatar'])}?@{{path}/front/web/v3/img/default/userface.gif(path = ${staticPath})}:${user['avatar']}" width="30" height="30" style="max-width:100px" class="img-circle" th:text="'&nbsp'+${user['nickname']}"/>
                        </span>
                    </td>
                    <td class="text-center" >
                        <th:block th:each="userExpandFrom : ${userExpandFromList}">
                            <span th:if="${user['registerFrom']}==${userExpandFrom['key']}" th:text="${userExpandFrom['value']}"></span>
                        </th:block>
                    </td>
                    <td class="text-center" >
                        <span th:if="${user['createTime']}=='' or ${user['createTime']} ==null">—</span>
                        <span th:attr="id='end-time-'+${user['id']}" th:if="${user['createTime']}!=null" th:text="${#strings.substring(user['createTime'],0,16)}"></span>
                    </td>
                    <td class="text-center" >
                        <span th:if="!${#maps.isEmpty(user['ProfileMap'])}">
                             <th:block th:each="profileMap:${user['ProfileMap']}">
                               <span th:text="'类型：'+(${profileMap['profileType']}=='QQ'?'QQ':'微信')"></span>
                               <span th:text="'昵称：'+${profileMap['name']}"></span>
                                  <br>
                             </th:block>
                        </span>
                             <span th:if="${#maps.isEmpty(user['ProfileMap'])}">
                               ——
                             </span>
                         </td>
                    <td class="text-center" >
                        <span class="label label-danger" th:if="${user['buyCourse']}==1" >否</span>
                        <span  class="label label-info" th:if="${user['buyCourse']}==2" >是</span>

                    </td>
                    <td class="text-center isavalible" >
                        <span th:if="${user['isavalible']}==1" class="label label-info">正常</span>
                        <span th:if="${user['isavalible']}==2"  class="label label-danger">禁封</span>
                    </td>
                    <td class="text-center" ><!--${ctx}/admin/user/queryUserExpandInfo?userId=${user.id}-->
                        <a th:href="@{/admin/user/cus/userInfo?userId={userId}(userId=${user['id']})}" class="c-master fs14" data-toggle="tooltip" data-placement="bottom" data-original-title="查看详情"><i class="fa fa-eye"></i></a>
                        <a href="javascript:void(0);" class="c-master fs14 ml5 " id="resetdBtn" th:attr="data-id=${user['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="奖励积分"><i class="fa fa-cubes"></i></a>
                        <a href="javascript:void(0);" id="unlockAndHistory" th:if="${user['isavalible']}==1"  th:attr="data-isavalible=${user['isavalible']},data-id=${user['id']}"    class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="禁封登录"><i class="fa fa-unlock-alt"></i></a>
                        <a href="javascript:void(0);" id="unlockAndHistory" th:if="${user['isavalible']}==2"  th:attr="data-isavalible=${user['isavalible']},data-id=${user['id']}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="恢复登录"><i class="fa fa-history"></i></a>
                        <a href="javascript:void(0);" class="c-master fs14 ml5 selectCourse" th:attr="data-id=${user['id']}"  data-toggle="tooltip" data-placement="bottom" data-original-title="赠送课程"><i class="fa fa-book"></i></a>
                        <a href="javascript:void(0);" id="resetPassword" th:attr="data-id=${user['id']}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="重置密码"><i class="fa fa-crosshairs"></i></a>
                        <a href="javascript:void(0);" id="sign-out" th:attr="data-id=${user['id']}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="强制退出登录"><i class="fa fa-sign-out"></i></a>
                    </td>
                </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="10" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
